{template "content","header"}
<!-- 面包屑 begin -->
<div class="breadcrumb">
    <h3>{$CATEGORYS[$catid][catname]}</h3><div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> > </span>{catpos($catid)} 正文</div>
</div>
<!-- end 面包屑-->

<!-- main  begin -->
<div class="main clearfix">
    <script type="text/javascript" src="{SKIN_PATH}js/glossy.js"></script>
    <div class="product w clearfix">
        <div id="preview">
            <img src="{thumb($thumb,392,0)}" alt="{$title}"/>
        </div>
        <div class="product-intro image-intro">
            <ul id="summary">
                <li><div id="name">{$title}</div></li>
                <li><div class="dt">版权编号：</div><div class="dd">{$picsn}</div></li>
                <li><div class="dt">类　　别：</div><div class="dd">{$pictype}</div></li>
                <li><div class="dt">提 供 商：</div><div class="dd">{$provider}</div></li>
                <li><div class="dt">上传时间：</div><div class="dd">{$inputtime}</div></li>
            </ul>
            <div id="ztc">
                <strong>主题词：{$ztc}</strong>
            </div>
            <div id="price2">
                <link href="{APP_PATH}statics/css/dialog.css" rel="stylesheet" type="text/css">
                <script type="text/javascript" src="{APP_PATH}statics/js/dialog.js"></script>
                <ul>
                    <li><i>非商业用途{$price1}元</i>{if !hasPaymentPicture($id,1)}<a href="javascript:void(0);" class="btn-order btn-fright" id="price_1" onclick="handlePayment(1)">预 订</a>{else}<a href="javascript:void(0);" class="btn-ordered btn-fright"></a>{/if}</li>
                    <li><i>商业用途{$price2}元(仅限一次使用和最高拷贝次数限制5万次)</i>{if !hasPaymentPicture($id,2)}<a href="javascript:void(0);" class="btn-order btn-fright" id="price_2" onclick="handlePayment(2)">预 订</a>{else}<a href="javascript:void(0);" class="btn-ordered btn-fright"></a>{/if}</li>
                    <li><i>版权图片{$price3}元（不限使用次数和拷贝限制）</i>{if !hasPaymentPicture($id,3)}<a href="javascript:void(0);" class="btn-order btn-fright" id="price_3" onclick="handlePayment(3)">预 订</a>{else}<a href="javascript:void(0);" class="btn-ordered btn-fright"></a>{/if}</li>
                </ul>
            </div>
            <script type="text/javascript">
                /**
                 * 处理支付请求
                 */
                function handlePayment(type)
                {
                    var myDialog = art.dialog({id:'msgbox', drag: false,resize: false,fixed:true});
                    $.ajax({
                        type: "POST",
                        url: "/api.php?op=buy_picture&id={$id}&type="+type,
                        dataType: "JSON",
                        beforeSend:function()
                        {
                            myDialog.content("<img src='{SKIN_PATH}images/ajax-loader.gif' class='ajaxloader'/> 正在处理请求数据...");
                        },
                        success:function(data)
                        {
                            if(data.status==-1)
                            {
                                myDialog.content('<p>亲，登录以后才能订购哟！</p><p style="text-align:center"><a href="{APP_PATH}index.php?m=member&c=index&a=login&siteid={$siteid}&forward=http://{$_SERVER["HTTP_HOST"]}{$_SERVER["REQUEST_URI"]}">登录</a>&nbsp;|&nbsp;<a href="{APP_PATH}index.php?m=member&c=index&a=register&siteid={$siteid}&forward=http://{$_SERVER["HTTP_HOST"]}{$_SERVER["REQUEST_URI"]}">注册</a>&nbsp;</p>');
                            }
                            else
                            {
                                if(data.price>0)
                                {
                                    myDialog.content("订购成功，成功支付 <font color='#F00'>"+data.price+ "</font> 元");
                                    myDialog.button({name:"关闭"});
                                    $("#price_"+data.type).removeClass("btn-order").addClass("btn-ordered").unbind("click").html("");
                                }
                                else if(data.price==-2)
                                {
                                    myDialog.content("对不起！您的余额不足，请充值后再预订，谢谢！");
                                    myDialog.button({name:"充值",focus:true,callback:function(){window.open('{APP_PATH}index.php?m=pay&c=deposit&a=pay');}},{name:"取消"});
                                }
                                else if(data.price==-1)
                                {
                                    myDialog.content("您已获得授权，无须重复订购，谢谢！");
                                    myDialog.button({name:"关闭"});
                                }
                            }

                        }
                    });
                }
            </script>
        </div>
    </div>
    <div class="contentbox">
        <div class="content-thumb"><img src="{thumb($thumb,656,0)}" alt="{$title}"/></div>
        <div class="content-body">
            <strong class="content-strong">信息说明：</strong>
            {$content}
        </div>
    </div>
    <ul class="comment-box">
        <li class="comments cents">
            {if $allow_comment && module_exists('comment')}
            <iframe src="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={id_encode("content_$catid",$id,$siteid)}&iframe=1" width="100%" height="100%" id="comment_iframe" frameborder="0" scrolling="no"></iframe>

            {/if}
            <!--<div class="mt"></div>
            <div class="mc">
                <dl class="clearfix comment-form">
                    <dt><a href="javascript:void(0);"><img src="images/noavatar.gif" alt=""/></a></dt>
                    <dd><textarea name="" id="" cols="30" rows="10"></textarea></dd>
                </dl>
                <p class="sub-comment clearfix"><input type="button" value="发表评论"/></p>
            </div>
            <div class="mlist clearfix">
                <dl>
                    <dt><img src="images/avatar-01.gif" alt=""/></dt>
                    <dd>张三 <span class="say">刚刚说：</span> <a href="javascript:void(0);" class="reply">回复</a></dd>
                    <dd>这本书讲解的东西还很全面嘛</dd>
                </dl>
                <dl class="none">
                    <dt><img src="images/avatar-02.gif" alt=""/></dt>
                    <dd>李四 <span class="say">刚刚说：</span> <a href="javascript:void(0);" class="reply">回复</a></dd>
                    <dd>这本书真不错</dd>
                </dl>
            </div>-->
        </li>
        <li class="message-list cents" style="display:none">
            <div class="mt">
                <h3>留言内容</h3>
                <ul>
                    <li><a href="#">排　序</a></li>
                    <li><a href="#">按页码</a></li>
                    <li><a href="#">按时间</a></li>
                </ul>
            </div>
            <div class="mc">
                <ul>
                    <li>
                        <div class="dt"><span class="ol">1、</span>|第96页|左栏|第8行|</div>
                        <div class="dd">
                            <p>错误之处：图29－3 DVI起搏模式，说明见正文。</p>
                            <p>修改：图29－3的起搏器心电图模式不是DVI，而应该是VDD或DDD。在出具这份起搏器心电图报告时，最好不要写模式，而写心房感知－心室起搏（AS－VP）。</p>
                            <p>提交人：浅浅阳光</p>
                            <p>提交时间：2013年09月23日 21:27</p>
                        </div>
                    </li>
                    <li>
                        <div class="dt"><span class="ol">2、</span>|第96页|左栏|第8行|</div>
                        <div class="dd">
                            <p>错误之处：图29－3 DVI起搏模式，说明见正文。</p>
                            <p>修改：图29－3的起搏器心电图模式不是DVI，而应该是VDD或DDD。在出具这份起搏器心电图报告时，最好不要写模式，而写心房感知－心室起搏（AS－VP）。</p>
                            <p>提交人：浅浅阳光</p>
                            <p>提交时间：2013年09月23日 21:27</p>
                        </div>
                    </li>
                </ul>
            </div>
        </li>
    </ul>
</div>
<!-- end main -->
{template "content","footer"}

<!--左侧浮动导航 begin -->
{template "content","inc_sidebar"}
<!-- end 左侧浮动导航-->